package com.ruike.alisurface.ui.adapters;

import android.content.Context;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.ruike.alisurface.R;
import com.ruike.alisurface.bean.MedicineBean;

import java.util.List;

public class MedicationAdapter extends BaseQuickAdapter<MedicineBean.DataBean.OrderDetailsBean, BaseViewHolder> {
    Context mContext;

    public MedicationAdapter(@Nullable List<MedicineBean.DataBean.OrderDetailsBean> data, Context context) {
        super(R.layout.item_medication, data);
        mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, MedicineBean.DataBean.OrderDetailsBean item) {
        helper.setText(R.id.medication_name, item.getProductName());
        helper.setText(R.id.medication_effect, item.getPurpose());
        helper.setText(R.id.medication_remark, item.getRemark());
        helper.setText(R.id.medication_take_method, item.getTake_method());
        helper.setText(R.id.medication_dose, item.getDose());
        helper.setText(R.id.medication_gram, item.getProduct_spec());
    }
}

